package com.github.wxiaoqi.security.crm.core.rest;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.wxiaoqi.security.common.crm.request.QueryMerchantBaseListRequest;
import com.github.wxiaoqi.security.common.msg.TableResultResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.util.Query;
import com.github.wxiaoqi.security.crm.core.biz.PlatformBaseBiz;
import com.github.wxiaoqi.security.crm.core.entity.PlatformBase;

@Controller
@RequestMapping("platformBase")
public class PlatformBaseController extends BaseController<PlatformBaseBiz,PlatformBase> {
	
	@Autowired
	private PlatformBaseBiz platformBaseBiz;
	/**
	 * 添加平台
	 */
	@RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity<?> addPlatform(@RequestBody PlatformBase entity) throws Exception {
		platformBaseBiz.addPlatform(entity);
        return ResponseEntity.ok(entity);
    }
	@RequestMapping(value = "/pageList",method = RequestMethod.POST)
    @ResponseBody
    public TableResultResponse<PlatformBase> pageList(@RequestBody QueryMerchantBaseListRequest bean){
        return baseBiz.pageList(bean);
    }

}